package ztc.common;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * Created by ztc on 16-4-8.下午7:52
 */
public class DBcon {
    public static Connection getCon(){
        Connection dbConnection = null;
        try {
            Class.forName(Constant.DRIVER_CLASS);
            dbConnection = DriverManager.getConnection(Constant.DATABASE_URL,
                    Constant.DATABASE_USRE, Constant.DATABASE_PASSWORD);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dbConnection;
    }
}
